home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
451-475
/
disk_474
/
crclists
/
genscript.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-05-06
|
750b
|
37 lines
/*
* This simple little program generates a script suitable for
* running by the CLI "execute" command, to create crclists
* for any range of disks in the AmigaLibDisk set.
*
* Typical use is:
*
* GenScript >ram:j 100 150
* Execute ram:j
*/
#include <stdio.h>
#define FMT1 "find >find.out AmigaLibDisk%d: -type f -print\n"
#define FMT2 "brik >Disk%03.3d.crc -Gbf find.out\n"
#define FMT3 "brik -C Disk%03.3d.crc\n"
main (argc, argv)
int argc;
char *argv[];
{
int start, stop;
if (argc != 3) {
printf ("usage: genscript startnumber stopnumber\n");
} else {
start = atoi (argv[1]);
stop = atoi (argv[2]);
while (start <= stop) {
printf (FMT1, start);
printf (FMT2, start);
printf (FMT3, start);
start++;
}
}
}